﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NHibernate.Mappings;

namespace Apollo
{
    [NHibernateEntity(Table = "apl_Bug")]
    public class Bug : ITrackable
    {
        public Bug() { }

        [PrimaryKey]
        public virtual int Id { get; set; }

        [Property]
        public virtual string Name { get; set; }
        
        [Property]
        public virtual string Description { get; set; }

        [Property]
        public virtual DateTime InsertDate { get; set; }

        [Property]
        public virtual string InsertBy { get; set; }

        [Property]
        public virtual DateTime? ModifiedDate { get; set; }

        [Property]
        public virtual string ModifiedBy { get; set; }


        [Property]
        public virtual BugPriority BugPriority { get; set; }

        [Property]
        public virtual BugStatus BugStatus { get; set; }

        [Property]
        public virtual string Reason { get; set; }

    }

    public enum BugStatus { 
        New = 0,
        NotABug = 1,
        Acknowledged = 2,
        Solved = 3,
        NotSolvable = 4
    }

    public enum BugPriority { 
        Normal = 0,

        Urgent = 2,
        Fatal = 3
    }
}
